﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
	<meta charset="utf-8" />
    <style type="text/css">
        *{
            padding:0px;
            margin:0px;
        }
    </style>
    <script type="text/javascript">
        function Draw()
        {
            var c =document.getElementById("mycanvas");
            c.width = 500;
            c.height = 500;
            var ctx = c.getContext("2d");
            ctx.fillRect(0,0,200,200);
        }
    </script>
</head>
<body>
    <canvas id="mycanvas"></canvas>
    <input type="button" value="画图" onclick="Draw()"/>
</body>
</html>
